import { createApp } from 'vue'
import dataV from '@jiaminghi/data-view'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import router from '@/router/router'
import '@/assets/common.less'

import Echarts from 'vue-echarts'
import * as echarts from 'echarts'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//使用组件
app.component('e-charts', Echarts)
//全局挂载
app.config.globalProperties.$echarts = echarts

app.use(dataV).use(ElementPlus).use(router).mount('#app')
